#include <ctime>
#include <iostream>
#include <fstream>

using namespace std;

void bubbleSort (int list[], int listLength)  {
    while (listLength--) {
        bool swapped = false;

        for(int i = 0; i < listLength; i++) {
            if(list [i] > list[i + 1]) {
                swapped = true;
            }
        }
        if(swapped == false) break;
    }
}

void read_from_file (conest char *filename, int a[], int length) {

for (int i=0; i<length; i++)
    file >> a[i];
 }

int main()
{
    cout<<"m1_sorted";

#define LEN 5000
int a [LEN];

read_from_file("m1_sorted.txt", a, LEN);
unsigned int t_startt = clock();
bubbleSort (a, Len);
unsigned int t_finish = clock();
unsigned int t_work = t__finish -  t_startt;
cout<<"m1_sorted"<<t_work<<" millisecods \n";

read_from_file("m2_reverse.txt", a, LEN);
t_start = clock
bubbleSort (a, Len);
t_finish = clock();
t_work = t__finish -  t_startt;
cout<<"m2_reverse"<<t_work<<" millisecods \n";

read_from_file("m3_shuffle.txt", a, LEN);
t_start = clock
bubbleSort (a, Len);
t_finish = clock();
t_work = t__finish -  t_startt;
cout<<"m3_shuffle"<<t_work<<" millisecods \n";

    return 0;
}
